<template>
    <div class="big_box" :model="from">
        <el-row :gutter="20">
            <el-col :span="8" :offset="2">
                <el-card class="box-card">
                    <div slot="header" class="clearfix">
                        <span>人员批量导入</span>
                        <el-button style="float: right; padding: 3px 0" type="text">人员Excel格式下载</el-button>
                    </div>
                    <div>
                        <el-upload class="upload-demo"
                                   ref="uploadUserref"
                                   action="https://jsonplaceholder.typicode.com/posts/"
                                   :on-preview="handlePreview"
                                   :on-remove="handleRemove"
                                   :file-list="fileListUser"
                                   :auto-upload="false">
                            <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                            <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUploadUser">上传到服务器</el-button>
                            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                        </el-upload>
                    </div>
                </el-card>
            </el-col>

            <el-col :span="8" :offset="2">
                <el-card class="box-card">
                    <div slot="header" class="clearfix">
                        <span>物资管理</span>
                        <el-button style="float: right; padding: 3px 0" type="text">物资Excel格式下载</el-button>
                    </div>
                    <div>
                        <el-upload class="upload-demo"
                                   ref="uploadmaterialref"
                                   action="https://jsonplaceholder.typicode.com/posts/"
                                   :on-preview="handlePreview"
                                   :on-remove="handleRemove"
                                   :file-list="fileListmaterial"
                                   :auto-upload="false">
                            <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                            <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUploadmaterial">上传到服务器</el-button>
                            <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                        </el-upload>
                    </div> 
                </el-card>
            </el-col>
        </el-row>
    </div>
</template>


<script>
    export default {
        name: "ExcelAddInfo.vue",
        data() {
            return {
                fileListmaterial: [
                  ],
                fileListUser: [

                ],
            };
        },
        created() {

        },
        methods: {
            submitUploadUser() {
                this.$refs.uploadUserref.submit();
            },
            submitUploadmaterial() {

                this.$refs.uploadmaterialref.submit();
            },
        }

    }
</script>

<style scoped>
</style>